<template>
<div>
  <van-nav-bar :title=navbarTitle fixed>
    <template #right>
    </template>
    <template #left>
    </template>
  </van-nav-bar>
</div>
</template>

<script>
import Vue from 'vue';
import { NavBar } from 'vant';

Vue.use(NavBar);
export default {
name: "navbar",
  computed:{
    navbarTitle(){
      return "购物车("+this.$store.state.cartList.length+")"
    }
  }
}
</script>

<style scoped>

</style>